package cn.xiaolang.function.data_structure.common;

import lombok.experimental.UtilityClass;

/**
 * @author Dean
 * @date 2021-08-09
 */
@UtilityClass
public class SortUtils {

    public void swap(int[] arr, int a, int b) {
        int temp = arr[a];
        arr[a] = arr[b];
        arr[b] = temp;
    }

    public void printArr(int[] arr) {
        for (int ele : arr) {
            System.out.print(ele + " ");
        }
        System.out.println();
    }
}
